/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package armadoresDTO;

import java.math.BigDecimal;
import java.math.RoundingMode;
import DTOsWS.*;


/*
import otroPackage.AbstractNetDTO;
import otroPackage.NetDTO;
*/

/**
 *
 * @author emmanuel05
 */
public class MetodosVarios {    
    public MetodosVarios(){        
    }  
    
    public AbstractNetDTO creaAbstractNetDto() {
        AbstractNetDTO andto = new AbstractNetDTO();    
        int nro=(int)Math.round(10000*Math.random());
        andto.setAddress("La Rioja "+nro);                        
        andto.setContactName("Carlos");
        andto.setCompanyName("Cacerola S.A.");
        andto.setName("NombreDeRed");                
        NetBehaviorFlagsDTO value = new NetBehaviorFlagsDTO();
        value.setEnabled(true);        
        andto.setFlags(value);
        return andto;
    }            
    
    public CampaignDTO creaCampaignDTO() {        
        CampaignDTO cmpdto = new CampaignDTO();    
        CampaignTicketFlagsDTO value = new CampaignTicketFlagsDTO();
        CampaignTicketDTO ctdto = new CampaignTicketDTO();
        ctdto.setHeader1("Este es el campaign Ticket DTO");
        cmpdto.setTicket(ctdto);   
        String[] campNames = {"Santander","Carrefour","Musimundo","ServiClub"};  
        cmpdto.setName(campNames[(int)(Math.random()*campNames.length)]);                
        ShopByCampaignBehaviorDTO sbcbdto = new ShopByCampaignBehaviorDTO();
        int nro=(int)Math.round(10000*Math.random());
        BigDecimal nrin= java.math.BigDecimal.valueOf(nro);
        sbcbdto.setChargedPoints(nrin);
        cmpdto.setShop(sbcbdto);
        cmpdto.setDescription("Esta es la descripcion de la campaña");
        return cmpdto;
    }
    
    public ShopCategoryDTO creaShopCategoryDTO() {
        ShopCategoryDTO scdto = new ShopCategoryDTO();
        String[] cats = {"Restaurant","Kiosko","Almacen","Supermercado"};
        scdto.setDescription(cats[(int)(Math.random()*cats.length)]);
        return scdto;
    }
    
    public PaginationDTO creaPaginationDTO() {
        PaginationDTO pdto = new PaginationDTO();
        pdto.setActualPage(1);
        pdto.setInitLimit(10);
        pdto.setRecordsTotal(30);
        pdto.setRowCount(10);       
        return pdto;
    }
    
    public CategoryDTO creaCategoryDTO() {
        CategoryDTO cdto = new CategoryDTO();
        String[] cats = {"Basica","Premium","VIP"};
        cdto.setName(cats[(int)(Math.random()*cats.length)]);               
        cdto.setWeightPointValueMoney(BigDecimal.ONE);
        return cdto;
        
    }
    
    public CompleteCampaignDTO creaCompleteCampaignDTO() {
        CompleteCampaignDTO ccdto = new CompleteCampaignDTO();
        ccdto.setAddress("Catamarca "+(int)Math.round(10000*Math.random()));
        String[] campNames = {"Santander","Carrefour","Musimundo","ServiClub"};  
        ccdto.setCompanyName(campNames[(int)(Math.random()*campNames.length)]);          
        ccdto.setContactName("Carlos");
        ccdto.setDescription("Esta es la descripcion de un CompleteCampaignDTO");
        return ccdto;
    }
    
    public CampaignTicketDTO crearCampaignTicketDTO() {
        CampaignTicketDTO cctdto = new CampaignTicketDTO();
        cctdto.setFooter("--- Este es el texto del Footer ---");
        cctdto.setHeader1("--- Este es el texto del Header ---");
        return cctdto;
    }
    
    public TerminalDTO crearTerminalDTO() {
        TerminalDTO tdto = new TerminalDTO();
        tdto.setName(null);
        return tdto;
    }    
}